package com.lanyou.esb.cook.proxy.entity;

import java.util.Date;
import java.util.UUID;

import org.apache.commons.lang3.StringUtils;

import com.lanyou.esb.cook.proxy.common.Constants;
import com.lanyou.esb.cook.proxy.meta.EnableType;

/**
 * 存储转发统计表
 * 
 * @author Davey.wu
 */
public class StoreForward {
	private String id;
	/** 领域ID **/
	private String fieldId;
	/** 系统ID **/
	private String systemId;
	/** 接口ID **/
	private String ifId;
	/** 接口名称 **/
	private String ifName;
	/** 状态 **/
	private String status;
	/** 次数 **/
	private int times;
	/** 转发时间 **/
	private Date forwardDate;

	/** 是否可用 **/
	private String isEnable;
	/** 创建人 **/
	private String creator;
	/** 创建时间 **/
	private Date createDate;
	/** 最后更新人员 **/
	private String modifier;
	/** 最后更新时间 **/
	private Date lastUpDate;

	public StoreForward() {
		this.id = UUID.randomUUID().toString().replace("-", "");
		this.isEnable = EnableType.ENABLE.ValueCode;
	}

	public void incrTimes() {
		this.times++;

	}

	public String getFieldId() {
		return fieldId;
	}

	public void setFieldId(String fieldId) {
		this.fieldId = fieldId;
	}

	public String getSystemId() {
		return systemId;
	}

	public void setSystemId(String systemId) {
		this.systemId = systemId;
	}

	public int getTimes() {
		return times;
	}

	public void setTimes(int times) {
		this.times = times;
	}

	public String getIfId() {
		return ifId;
	}

	public void setIfId(String ifId) {
		this.ifId = ifId;
	}

	public String getIsEnable() {
		return isEnable;
	}

	public void setIsEnable(String isEnable) {
		this.isEnable = isEnable;
	}

	public String getCreator() {
		return StringUtils.isEmpty(creator) ? Constants.DEFAULT_USER : creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Date getCreateDate() {
		return createDate == null ? new Date() : createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getModifier() {
		return StringUtils.isEmpty(modifier) ? Constants.DEFAULT_USER
				: modifier;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier;
	}

	public Date getLastUpDate() {
		return lastUpDate;
	}

	public void setLastUpDate(Date lastUpDate) {
		this.lastUpDate = lastUpDate;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getForwardDate() {
		return forwardDate;
	}

	public void setForwardDate(Date forwardDate) {
		this.forwardDate = forwardDate;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getIfName() {
		return ifName;
	}

	public void setIfName(String ifName) {
		this.ifName = ifName;
	}

}